<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>应用商店</title>
    <meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1">
    <link rel="stylesheet" href="/static/component/pear/css/pear.css"/>
    <script src="/static/component/layui/layui.js"></script>
    <script src="/static/component/pear/pear.js"></script>
    <script src="/static/component/pear/module/ruinuo/sortable.js"></script>
    <link rel="stylesheet" href="/static/component/pear/css//module/engine_table.css"/>
</head>
<style>
    .button_group {
        margin-right: 10px;
        display: flex;
    }

    .button_group button {
        border-right: 0px;
        border-radius: 0px;
        padding: 0px 15px;
    }

    .button_group button:first-child {
        border-radius: 6px 0px 0px 6px;
    }

    .button_group button:last-child {
        border-right: 1px solid #dcdfe6;
        border-radius: 0px 6px 6px 0px;
    }

    .addon_tag {
        display: block;
        overflow: hidden;
        padding: 15px 0 10px 0;
        height: 60px;
    }

    .addon_name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-top: 6px;
    }

    .addon_data {
        display: flex;
        align-items: center;
        padding: 10px 0;
    }

    .addon_data .download {
        color: #a8abb2;
        flex: 1;
    }

    .addon_data .download i {
        padding-right: 5px;
    }

    .addon_data .sale_price {
        color: #f56c6c;
        font-size: 16px;
    }

    .addon_name {
        font-size: 16px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        text-overflow: ellipsis;
    }
</style>
<body class="pear-container">
<div class="view_body"></div>
<script type="text/html" id="view_body_data">
    <div class="body_con">
        {{# if(d.left.status== 1){ }}
        <div class="left">
            <div class="layui-card">
                <div class="layui-card-header display_flex">
                    <div class="flex_1">{{d.left.title}}</div>
                    {{# if(d.left.type== 2){ }}
                    <div class="layui-icon layui-icon-add-1 tree_add"></div>
                    {{# } }}
                </div>
                <div class="layui-card-body">
                    <div class="layui-menu">
                        <ul></ul>
                    </div>
                </div>
            </div>
        </div>
        {{# } }}

        <div class="right">
            <div class="table_body">
                <div class="table_view layui-form" style="margin-top: 0px">
                    <div class="head_button display_flex">

                        <div class="button_group">
                            <button type="button" onclick="tab(this)" data-current="1"
                                    class="pear-btn btn_theme_3 pear-btn-sm">全部
                            </button>
                            <button type="button" onclick="tab(this)" data-current="2"
                                    class="pear-btn btn_theme_0 pear-btn-sm">免费
                            </button>
                            <button type="button" onclick="tab(this)" data-current="3"
                                    class="pear-btn btn_theme_0 pear-btn-sm">付费
                            </button>
                            <button type="button" onclick="tab(this)" data-current="4"
                                    class="pear-btn btn_theme_0 pear-btn-sm">本地
                            </button>
                            <button type="button" onclick="tab(this)" data-current="5"
                                    class="pear-btn btn_theme_0 pear-btn-sm">已购买
                            </button>
                        </div>
                        <div class="flex_1">
                            <button id="local_Install" class="pear-btn pear-btn-primary pear-btn-sm">
                                <i class="ruinuo-icon icon-yunshangchuan_o"></i>本地安装
                            </button>
                            <button type="button" class="pear-btn pear-btn-sm btn_theme_2" onclick="UserInfo();"><i
                                    class="ruinuo-icon icon-user"></i>会员信息
                            </button>

                        </div>
                        {{# if(d.header.search.datetime.length != 0 || d.header.search.like){ }}
                        <div class="layui-form display_flex">
                            <div class="flex_1 display_flex table_from">
                                {{# if(d.header.search.datetime.length != 0){ }}
                                <div class="datetime_select">
                                    <div class="layui-input-block">
                                        <select name="search_time_field" lay-filter="select_filter">
                                            {{# layui.each(d.header.search.datetime, function(index, item){ }}
                                            <option value="{{item.value}}">{{item.label}}</option>
                                            {{# }); }}
                                        </select>
                                    </div>
                                </div>
                                <div class="datetime_input">
                                    <div class="layui-input-block  layui-input-wrap">
                                        <div class="layui-input-prefix"><i class="ruinuo-icon icon-riqi"></i></div>
                                        <input id="search_time_field_val" name="search_time_field_val" type="text"
                                               readonly="" placeholder="开始日期 - 结束日期" autocomplete="off"
                                               lay-affix="clear" class="layui-input">
                                    </div>
                                </div>
                                {{# } }}
                                {{# if(d.header.search.like){ }}
                                <div class="keyword_input">
                                    <div class="layui-input-block layui-input-group">
                                        <div class="group_input group_prefix">关键词</div>
                                        <input name="keyword" type="text" placeholder="{{d.header.search.like}}"
                                               autocomplete="off" lay-affix="clear" class="layui-input">
                                    </div>
                                </div>
                                {{# } }}

                            </div>
                            <div>
                                <button class="pear-btn pear-btn-primary pear-btn-sm"
                                        onclick="layui.engine_table.SearchLoad('{{d.table.elem}}');">
                                    <i class="ruinuo-icon icon-search"></i>搜索
                                </button>
                                <button class="pear-btn pear-btn-sm"
                                        onclick="layui.engine_table.SearchBack('{{d.table.elem}}');">
                                    <i class="ruinuo-icon icon-back"></i>重置
                                </button>
                            </div>
                        </div>
                        {{# } }}
                    </div>
                    {{# if(d.table.style<=3){ }}
                    <table id="{{d.table.elem}}" lay-filter="{{d.table.elem}}"></table>
                    {{# } }}
                    {{# if(d.table.style>=4){ }}
                    <div class="card_table">
                        <div class="card_table_con"></div>
                    </div>
                    {{# } }}
                </div>
            </div>
        </div>
    </div>
</script>
<script type="text/html" id="tplButton">

    <button class="pear-btn pear-btn-smm btn_theme_1" onclick="InstallAction('{{d.version_id}}','{{d.id}}');"><span
            style="font-size: 12px">安装</span></button>
    <button class="pear-btn pear-btn-smm btn_theme_2" onclick="UninstallAction('{{d.version_id}}','{{d.id}}');"><span
            style="font-size: 12px">卸载</span></button>
    {{# if(d.demo_url){ }}
    <button class="pear-btn pear-btn-smm btn_theme_0" onclick="DemoAction('{{d.demo_url}}')"><span
            style="font-size: 12px">演示</span></button>
    {{# } }}
</script>


<script type="text/html" id="datatable_tpl">
    {{# layui.each(d, function(kk, group){ }}
    <div class='layui-row layui-col-space15 row-hight'>
        {{# layui.each(group, function(index, item){ }}
        <div class="layui-col-md2 card_data_table" onclick="getDetail('{{item.id}}','{{item.name}}')"
             data-id="{{item.id}}" data-index="{{index}}">
            <div class="layui-card suspension">
                <div class="layui-card-header file_con">
                    <div class="file">{{item.imgs}}</div>
                </div>
                <div class="layui-card-body">
                    <div class="addon_tag">
                        {{# layui.each(item.tags, function(index2, item2){ }}
                        <span class="status_con bg_color_{{index2}}">{{item2}}</span>
                        {{# }); }}
                    </div>
                    <div class="addon_name">
                        {{item.name}}
                    </div>
                    <div class="addon_data">
                        <div class="download"><i class="ruinuo-icon icon-download"></i>{{item.down || 0}}</div>
                        {{# if(item.id){ }}
                        <div class="sale_price">{{# if(item.type== 2){ }}￥{{# } }}{{item.sale_price || '免费'}} {{#
                            if(item.type== 1){ }}积分{{# } }}
                        </div>
                        {{# } else { }}
                        <div class="install">
                            {{# if(item.install==1){ }}
                            <button class="pear-btn pear-btn-primary pear-btn-sm"
                                    onclick="Install('{{item.addon_num}}')">安装{{d.version || ''}}
                            </button>
                            {{# } }}
                            {{# if(item.install==2){ }}
                            <button class="pear-btn pear-btn-sm btn_theme_2" onclick="Uninstall('{{item.addon_num}}')">
                                卸载{{d.version || ''}}
                            </button>
                            {{# } }}
                        </div>
                        {{# } }}
                    </div>

                </div>
            </div>
        </div>
        {{# }); }}
    </div>
    {{# }); }}
    {{# if(d.length == 0){ }}
    <div class="nodata_con">
        <div class="ruinuo-icon icon-meiyoushuju"></div>
        <div class="desc">暂无数据</div>
    </div>
    {{# } }}
</script>

<script>
    let shopUrl='{:GetConfig('system','shop_url')}';
</script>
<script src="/static/js/common/shop/config.js?t={:time()}"></script>
<script src="/static/js/common/shop/lists.js?t={:time()}"></script>
</body>
</html>
